package com.yunkeji.dao.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yunkeji.common.core.mapper.BaseMapperPlus;
import com.yunkeji.dao.domain.AppUserSpecial;
import com.yunkeji.dao.domain.CallSheetInfo;
import com.yunkeji.dao.vo.AppUserSpecialVo;
import com.yunkeji.dao.vo.PayDetailVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 特殊权限用户对象Mapper接口
 *
 * @author 雷擎宇
 * @date 2024-12-31
 */
public interface AppUserSpecialMapper
        extends BaseMapperPlus<AppUserSpecialMapper, AppUserSpecial, AppUserSpecialVo> {


    @Select("<script>" +
        "SELECT  " +
        "s.id," +
        "s.remark," +
        "s.create_by," +
        "s.create_time,  " +
        "u.sex as sex," +
        "u.platform_id," +
        "e.head_url," +
        "e.nick_name " +
        "FROM  " +
        "ykj_app_user_special s  " +
        "LEFT JOIN ykj_app_user u ON s.id = u.id " +
        "LEFT JOIN ykj_app_user_ext e ON s.id = e.id " +
        "where 1=1 " +
        "<if test='platformId!=null'>" +
        "and s.platform_id = #{platformId} " +
        "</if>" +
        "order by s.create_time desc " +
        "</script>")
    Page<AppUserSpecialVo> selectListPage(@Param("platformId") Long platformId,
                                     @Param("Page") Page<AppUserSpecial> Page);
}
